package com.example.demo.server;


import com.example.demo.mapper.UserMapper;
import com.example.demo.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2023-03-19
 * Time: 16:31
 */

@Service
public class UserService {


    @Autowired
    private UserMapper userMapper;

    //用户注册
    public int add(String username,String password) {
        return userMapper.add(username,password);
    }

    //用户登录
    public UserInfo login(String username, String password) {
        return userMapper.login(username,password);
    }

}
